package com.zmm.common.exception.handle;

import com.zmm.common.base.model.ResponseCode;
import com.zmm.common.base.model.ResultCode;

/**
 * @author 900045
 * @description:
 * @name NoStockException
 * @date By 2021-06-22 11:08:11
 */
public class NoStockException extends RuntimeException implements BaseException{

	/**
	 *  结果码
	 */
	protected ResponseCode respCode = ResultCode.FAIL;
	
	private Long skuId;
	
	public NoStockException(Long skuId,ResponseCode respCode) {
		super("商品id:[+"+skuId+"],没有库存了");
		this.respCode = respCode;
	}

	public Long getSkuId() {
		return skuId;
	}

	public void setSkuId(Long skuId) {
		this.skuId = skuId;
	}


	@Override
	public ResponseCode getCode() {
		return this.respCode;
	}
}
